using UnityEngine;
// [Assembly-CSharp.dll].Packer
public static class Packer
{
    // Methods
    public static float ToFloat(float x, float y, float z, float w)
    {
        float val_14;
        float val_15;
        float val_16;
        float val_17;
        var val_20;
        var val_23;
        var val_26;
        val_14 = 0f;
        val_15 = 0f;
        if(x >= 0)
        {
                val_15 = x;
            if(x > 1f)
        {
                val_15 = 1f;
        }
        
        }
        
        if(y >= 0)
        {
                val_14 = y;
            if(y > 1f)
        {
                val_14 = 1f;
        }
        
        }
        
        val_16 = 0f;
        val_17 = 0f;
        if(z >= 0)
        {
                val_17 = z;
            if(z > 1f)
        {
                val_17 = 1f;
        }
        
        }
        
        if(w >= 0)
        {
                val_16 = w;
            if(w > 1f)
        {
                val_16 = 1f;
        }
        
        }
        
        val_16 = val_16 * 63f;
        if(mem[536889581] != 0)
        {
                var val_1 = (1f == Infinityf) ? 1 : 0;
            val_20 = val_17 * 63f;
        }
        else
        {
                val_20 = val_17 * 63f;
        }
        
        if(mem[536889581] != 0)
        {
                var val_3 = (63f == Infinityf) ? 1 : 0;
            val_23 = val_14 * 63f;
        }
        else
        {
                val_23 = val_14 * 63f;
        }
        
        if(mem[536889581] != 0)
        {
                var val_5 = (63f == Infinityf) ? 1 : 0;
            val_26 = val_15 * 63f;
        }
        else
        {
                val_26 = val_15 * 63f;
        }
        
        var val_8 = (63f == Infinityf) ? -2147483648 : 1115422720;
        val_8 = ((((63f == Infinityf) ? 1 : 0) != 0) ? 0 : (W26 << 6)) + val_8;
        val_8 = val_8 + ((((63f == Infinityf) ? 1 : 0) != 0) ? 0 : (W24 << 12));
        val_8 = val_8 + ((((1f == Infinityf) ? 1 : 0) != 0) ? 0 : (W21 << 18));
        return (float)(float)val_8;
    }
    public static float ToFloat(UnityEngine.Vector4 factor)
    {
        return Packer.ToFloat(x:  (factor.x >= 0) ? factor.x : 0f, y:  (factor.y >= 0) ? (S6) : 0f, z:  (factor.z >= 0) ? (S7) : 0f, w:  (factor.w >= 0) ? 1f : 0f);
    }
    public static float ToFloat(float x, float y, float z)
    {
        float val_10;
        float val_11;
        float val_12;
        var val_15;
        var val_18;
        val_10 = 0f;
        val_11 = 0f;
        if(x >= 0)
        {
                val_11 = x;
            if(x > 1f)
        {
                val_11 = 1f;
        }
        
        }
        
        if(y >= 0)
        {
                val_10 = y;
            if(y > 1f)
        {
                val_10 = 1f;
        }
        
        }
        
        val_12 = 0f;
        if(z >= 0)
        {
                val_12 = z;
            if(z > 1f)
        {
                val_12 = 1f;
        }
        
        }
        
        val_12 = val_12 * 255f;
        if(mem[536889581] != 0)
        {
                var val_1 = (1f == Infinityf) ? 1 : 0;
            val_15 = val_10 * 255f;
        }
        else
        {
                val_15 = val_10 * 255f;
        }
        
        if(mem[536889581] != 0)
        {
                var val_3 = (255f == Infinityf) ? 1 : 0;
            val_18 = val_11 * 255f;
        }
        else
        {
                val_18 = val_11 * 255f;
        }
        
        var val_6 = (255f == Infinityf) ? -2147483648 : 1132396544;
        val_6 = ((((255f == Infinityf) ? 1 : 0) != 0) ? 0 : (W24 << 8)) + val_6;
        val_6 = val_6 + ((((1f == Infinityf) ? 1 : 0) != 0) ? 0 : (W21 << 16));
        return (float)(float)val_6;
    }
    public static float ToFloat(float x, float y)
    {
        float val_6;
        float val_7;
        var val_10;
        val_6 = 0f;
        val_7 = 0f;
        if(x >= 0)
        {
                val_7 = x;
            if(x > 1f)
        {
                val_7 = 1f;
        }
        
        }
        
        if(y >= 0)
        {
                val_6 = y;
            if(y > 1f)
        {
                val_6 = 1f;
        }
        
        }
        
        val_6 = val_6 * 4095f;
        if(mem[536889581] != 0)
        {
                var val_1 = (1f == Infinityf) ? 1 : 0;
            val_10 = val_7 * 4095f;
        }
        else
        {
                val_10 = val_7 * 4095f;
        }
        
        var val_4 = (1f == Infinityf) ? -2147483648 : mem[536889581];
        val_4 = ((((1f == Infinityf) ? 1 : 0) != 0) ? 0 : (W21 << 12)) + val_4;
        return (float)(float)val_4;
    }

}
